package com.meida.module.bus.client.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import lombok.NoArgsConstructor;

/**
 * 作业无忧订单状态
 *
 * @author gp
 * @date 2021/8/9
 */
@NoArgsConstructor
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
@ApiModel("作业无忧订单状态")
public enum OrderStateZEnum {
    /**
     * 订单状态
     */
    OrderState0("0", "已取消", "已取消", "", ""),
    OrderState1("Z1", "待出价", "待出价", "lookDetail", "查看详情"),
    OrderState2("2", "待解答", "待解答", "lookDetail", "查看详情"),
    OrderState3("Z3", "解答中", "解答中", "lookAnswer", "查看答案"),
    OrderState4("Z4", "已解答", "已解答", "lookAnswer", "查看答案"),
    OrderState5("5", "已完成", "已完成", "goAppraise", "去评价"),
    OrderState6("6", "售后处理", "售后处理", "lookDetail", "查看详情"),
    OrderState7("7", "已退款", "已退款", "lookRefund", "查看退款进度");

    @EnumValue
    private String value;
    private String label;
    private String btnId;
    private String btnName;
    /**
     * 学霸订单状态值展示
     */
    private String label2;

    OrderStateZEnum(String value, String label, String label2, String btnId, String btnName) {
        this.value = value;
        this.label = label;
        this.label = label2;
        this.btnId = btnId;
        this.btnName = btnName;
    }


    public void setValue(String value) {
        this.value = value;
    }

    public String getValue() {
        return value;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public String getLabel() {
        return label;
    }

    public void setLabel2(String label2) {
        this.label2 = label2;
    }

    public String getLabel2() {
        return label2;
    }


    public String getBtnId() {
        return btnId;
    }

    public void setBtnId(String btnId) {
        this.btnId = btnId;
    }

    public String getBtnName() {
        return btnName;
    }

    public void setBtnName(String btnName) {
        this.btnName = btnName;
    }

    public static OrderStateZEnum getByValue(String value) {
        for (OrderStateZEnum orderStateEnum : values()) {
            if (orderStateEnum.getValue().equals(value)) {
                return orderStateEnum;
            }
        }
        return null;
    }
}
